package com.example.myblog_ssm.common;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22479
 * Date: 2023-03-25
 * Time: 17:08
 */

/**
 * 提取Html中的纯文本
 */
public class HtmlToText {
    public static String test(String html) {
        Document doc = Jsoup.parse(html);
        String text = doc.body().text();
        return text;
    }
}
